package work;

public class RelationEntity{
	final String type1;
	final String type2;
	final String text1;
	final String text2;
	final int doc;
	final String relation;
	public RelationEntity(NamedEntity ne1, NamedEntity ne2, int line_num, String _relation){
		type1 = ne1.type;
		text1 = ne1.text;
		type2 = ne2.type;
		text2 = ne2.text;
		doc = line_num;
		relation = _relation;
	}
	public RelationEntity(String _text1, String _type1,String _text2, String _type2, int line_num, String _relation){
		type1 = _type1;
		text1 = _text1;
		type2 = _type2;
		text2 = _text2;
		doc = line_num;
		relation = _relation;
	}
	@Override
	public int hashCode() {
		return (type1 + type2 + text1 + text2 + doc + relation).hashCode();
	}
	@Override
	public boolean equals(Object obj) {
		return this.hashCode() == ((RelationEntity)obj).hashCode();
	}
	
	
	
}
